package com.lgb.Service;


import com.lgb.pojo.Blog;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import com.lgb.vo.BlogQuery;

public interface BlogService {

    //查询
    Blog getBlog(Long id);

    //查询指定blog并添加markdown转换html
    Blog getAndConvert(Long id);

    //新增
    Blog saveBlog(Blog blog);

    //修改
    Blog updateBlog(Long id , Blog blog);

    //删除
    void deleteBlog(Long id);

    //模糊查询+分页(需blog参数)
    Page<Blog> listBlog(Pageable pageable , BlogQuery blog);

    //分页(不需要参数)
    Page<Blog> listBlog(Pageable pageable);

    //分页(需String参数)
    Page<Blog> listBlog(String query , Pageable pageable);
}
